package abs.domain;

import java.io.Serializable;

import java.lang.StringBuilder;

import java.util.Calendar;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import javax.xml.bind.annotation.*;

import javax.persistence.*;

/**
 */

@Entity
@NamedQueries({
		@NamedQuery(name = "findAllGrupoClientess", query = "select myGrupoClientes from GrupoClientes myGrupoClientes"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100cdgo", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100cdgo = ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100cdgoContaining", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100cdgo like ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100clas", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100clas = ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100clasContaining", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100clas like ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100esta", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100esta = ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100estaContaining", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100esta like ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100fead", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100fead = ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100feadAfter", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100fead > ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100feadBefore", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100fead < ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100femo", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100femo = ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100femoAfter", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100femo > ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100femoBefore", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100femo < ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100load", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100load = ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100loadContaining", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100load like ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100lomo", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100lomo = ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100lomoContaining", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100lomo like ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100name", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100name = ?1"),
		@NamedQuery(name = "findGrupoClientesByGrpcl100nameContaining", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100name like ?1"),
		@NamedQuery(name = "findGrupoClientesByPrimaryKey", query = "select myGrupoClientes from GrupoClientes myGrupoClientes where myGrupoClientes.grpcl100cdgo = ?1") })
@Table(catalog = "absV2", name = "grpcl100")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(namespace = "absWeb/abs/domain", name = "GrupoClientes")
@XmlRootElement(namespace = "absWeb/abs/domain")
public class GrupoClientes implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */

	@Column(name = "grpcl100cdgo", length = 5, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	@XmlElement
	String grpcl100cdgo;
	/**
	 */

	@Column(name = "grpcl100name", length = 30, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grpcl100name;
	/**
	 */

	@Column(name = "grpcl100clas", length = 5)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grpcl100clas;
	/**
	 */

	@Column(name = "grpcl100esta", length = 1)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grpcl100esta;
	/**
	 */

	@Column(name = "grpcl100load", length = 30)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grpcl100load;
	/**
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "grpcl100fead", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Calendar grpcl100fead;
	/**
	 */

	@Column(name = "grpcl100lomo", length = 30)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grpcl100lomo;
	/**
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "grpcl100femo", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Calendar grpcl100femo;

	/**
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "grpcl100nocia", referencedColumnName = "co000nocia", nullable = false) })
	@XmlTransient
	Companias companias;
	/**
	 */
	@OneToMany(mappedBy = "grupoClientes", cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY)
	@XmlElement(name = "", namespace = "")
	java.util.Set<abs.domain.Clientes> clienteses;

	/**
	 */
	public void setGrpcl100cdgo(String grpcl100cdgo) {
		this.grpcl100cdgo = grpcl100cdgo;
	}

	/**
	 */
	public String getGrpcl100cdgo() {
		return this.grpcl100cdgo;
	}

	/**
	 */
	public void setGrpcl100name(String grpcl100name) {
		this.grpcl100name = grpcl100name;
	}

	/**
	 */
	public String getGrpcl100name() {
		return this.grpcl100name;
	}

	/**
	 */
	public void setGrpcl100clas(String grpcl100clas) {
		this.grpcl100clas = grpcl100clas;
	}

	/**
	 */
	public String getGrpcl100clas() {
		return this.grpcl100clas;
	}

	/**
	 */
	public void setGrpcl100esta(String grpcl100esta) {
		this.grpcl100esta = grpcl100esta;
	}

	/**
	 */
	public String getGrpcl100esta() {
		return this.grpcl100esta;
	}

	/**
	 */
	public void setGrpcl100load(String grpcl100load) {
		this.grpcl100load = grpcl100load;
	}

	/**
	 */
	public String getGrpcl100load() {
		return this.grpcl100load;
	}

	/**
	 */
	public void setGrpcl100fead(Calendar grpcl100fead) {
		this.grpcl100fead = grpcl100fead;
	}

	/**
	 */
	public Calendar getGrpcl100fead() {
		return this.grpcl100fead;
	}

	/**
	 */
	public void setGrpcl100lomo(String grpcl100lomo) {
		this.grpcl100lomo = grpcl100lomo;
	}

	/**
	 */
	public String getGrpcl100lomo() {
		return this.grpcl100lomo;
	}

	/**
	 */
	public void setGrpcl100femo(Calendar grpcl100femo) {
		this.grpcl100femo = grpcl100femo;
	}

	/**
	 */
	public Calendar getGrpcl100femo() {
		return this.grpcl100femo;
	}

	/**
	 */
	public void setCompanias(Companias companias) {
		this.companias = companias;
	}

	/**
	 */
	public Companias getCompanias() {
		return companias;
	}

	/**
	 */
	public void setClienteses(Set<Clientes> clienteses) {
		this.clienteses = clienteses;
	}

	/**
	 */
	public Set<Clientes> getClienteses() {
		if (clienteses == null) {
			clienteses = new java.util.LinkedHashSet<abs.domain.Clientes>();
		}
		return clienteses;
	}

	/**
	 */
	public GrupoClientes() {
	}

	/**
	 * Copies the contents of the specified bean into this bean.
	 *
	 */
	public void copy(GrupoClientes that) {
		setGrpcl100cdgo(that.getGrpcl100cdgo());
		setGrpcl100name(that.getGrpcl100name());
		setGrpcl100clas(that.getGrpcl100clas());
		setGrpcl100esta(that.getGrpcl100esta());
		setGrpcl100load(that.getGrpcl100load());
		setGrpcl100fead(that.getGrpcl100fead());
		setGrpcl100lomo(that.getGrpcl100lomo());
		setGrpcl100femo(that.getGrpcl100femo());
		setCompanias(that.getCompanias());
		setClienteses(new java.util.LinkedHashSet<abs.domain.Clientes>(that.getClienteses()));
	}

	/**
	 * Returns a textual representation of a bean.
	 *
	 */
	public String toString() {

		StringBuilder buffer = new StringBuilder();

		buffer.append("grpcl100cdgo=[").append(grpcl100cdgo).append("] ");
		buffer.append("grpcl100name=[").append(grpcl100name).append("] ");
		buffer.append("grpcl100clas=[").append(grpcl100clas).append("] ");
		buffer.append("grpcl100esta=[").append(grpcl100esta).append("] ");
		buffer.append("grpcl100load=[").append(grpcl100load).append("] ");
		buffer.append("grpcl100fead=[").append(grpcl100fead).append("] ");
		buffer.append("grpcl100lomo=[").append(grpcl100lomo).append("] ");
		buffer.append("grpcl100femo=[").append(grpcl100femo).append("] ");

		return buffer.toString();
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((grpcl100cdgo == null) ? 0 : grpcl100cdgo.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof GrupoClientes))
			return false;
		GrupoClientes equalCheck = (GrupoClientes) obj;
		if ((grpcl100cdgo == null && equalCheck.grpcl100cdgo != null) || (grpcl100cdgo != null && equalCheck.grpcl100cdgo == null))
			return false;
		if (grpcl100cdgo != null && !grpcl100cdgo.equals(equalCheck.grpcl100cdgo))
			return false;
		return true;
	}
}
